#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int main(void)
{
	int a;
	pid_t pid, pgid;
	pid=(long)getpid();
	pgid=(long)getpgrp();
	a=setpgid(pid,pgid);
	printf("a=%d\t pid=%ld\t pgid=%ld\n",a,pid,pgid);
	return 0;
}
